package com.wtwd.device.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author mjy
 * @since 2021-09-06
 */
@ApiModel(value="BloodSugarRecord对象", description="")
public class BloodSugarRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "血糖记录id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "设备id",required = true)
    private Long deviceId;

    @ApiModelProperty(value = "时间格式：yyyy-MM-dd",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date time;

    @ApiModelProperty(value = "平均血糖",required = true)
    private Integer avgBloodSugar;

    @ApiModelProperty(value = "最小血糖",required = true)
    private Integer minBloodSugar;

    @ApiModelProperty(value = "最大血糖",required = true)
    private Integer maxBloodSugar;

    @ApiModelProperty(value = "每次测量的信息",required = true)
    private List<BloodSugarInfo> ListBloodSugarRecord;

    private String bloodSugarInfo;

    @ApiModelProperty(value = "最后上传时间",required = false)
    private Long uploadTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getAvgBloodSugar() {
        return avgBloodSugar;
    }

    public void setAvgBloodSugar(Integer avgBloodSugar) {
        this.avgBloodSugar = avgBloodSugar;
    }

    public Integer getMinBloodSugar() {
        return minBloodSugar;
    }

    public void setMinBloodSugar(Integer minBloodSugar) {
        this.minBloodSugar = minBloodSugar;
    }

    public Integer getMaxBloodSugar() {
        return maxBloodSugar;
    }

    public void setMaxBloodSugar(Integer maxBloodSugar) {
        this.maxBloodSugar = maxBloodSugar;
    }

    public String getBloodSugarInfo() {
        return bloodSugarInfo;
    }

    public void setBloodSugarInfo(String bloodSugarInfo) {
        this.bloodSugarInfo = bloodSugarInfo;
    }

    public Long getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Long uploadTime) {
        this.uploadTime = uploadTime;
    }

    public List<BloodSugarInfo> getListBloodSugarRecord() {
        return ListBloodSugarRecord;
    }

    public void setListBloodSugarRecord(List<BloodSugarInfo> listBloodSugarRecord) {
        ListBloodSugarRecord = listBloodSugarRecord;
    }

    @Override
    public String toString() {
        return "BloodSugarRecord{" +
                "id=" + id +
                ", deviceId=" + deviceId +
                ", time=" + time +
                ", avgBloodSugar=" + avgBloodSugar +
                ", minBloodSugar=" + minBloodSugar +
                ", maxBloodSugar=" + maxBloodSugar +
                ", ListBloodSugarRecord=" + ListBloodSugarRecord +
                ", bloodSugarInfo='" + bloodSugarInfo + '\'' +
                ", uploadTime=" + uploadTime +
                '}';
    }
}
